package com.zls.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@TableName("t_department")
public class Department implements Serializable {
    @TableId(value = "ID",type = IdType.AUTO)
    private Integer id;
    private String deptName;
    //该部门下的员工信息,一对多
    @TableField(exist = false)
    private List<Employee> emps;
    private String deptDesc;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createdate;
}